﻿#ifndef CPLAYER_H
#define CPLAYER_H

#include <QObject>

class cPlayerPrivate;
class cStream;
class mediaDemuxing;

class cPlayer : public QObject
{
    Q_OBJECT
public:
    explicit cPlayer(QObject *parent = 0);
	~cPlayer();
    Q_DECLARE_PRIVATE(cPlayer)

    enum class State{
        noPlay,
        Playing,
        Pause,
        Stop
    };

public slots:
    bool start();
    bool stop();
    void pause();

public:
    bool seek(__int64 pos);
    void appendMediaList(QStringList list);
    void appendMediaFile(QString file);
    int  currentPos();
    int  duration();
    void setMediaList(QStringList list);
    void setMediaFile(QString file);
    void setOutWidget(QWidget *w);
    State state();


private:
    cPlayerPrivate *d;

signals:

public slots:

};

#endif // CPLAYER_H
